package com.gzz.demo.pattern.command;

/**
 * 接收者
 *
 * 与策略模式相比就是这个东西
 *
 */
public class Receiver {
    private String name = "ABC";
    private int quantity = 10;

    public void buy(){
        System.out.println("Stock [ Name: "+name+",                 Quantity: " + quantity +" ] bought");
    }
    public void sell(){
        System.out.println("Stock [ Name: "+name+",                 Quantity: " + quantity +" ] sold");
    }
}
